import React from 'react'

function Myfilter() {
    let arr = [1, 5, 4, 1, 2, 4, 8]
    let setarr = (arr) => [new Set(arr)]
    console.log(setarr(arr))
    return (
        <div>
            <p>封装数组去重</p>
            <p>{setarr(arr)}</p>
        </div>
    )
}

export default Myfilter
